//
//  MineDiamondCell.swift
//  NDAi
//
//  Created by 丸子 on 2024/7/2.
//

import UIKit

class MineDiamondCell: UITableViewCell {
    private lazy var backView: UIView = {
        let view = UIView()
        view.backgroundColor = UIColor(hexString: "#25262B")
        view.allRound(10)
        return view
    }()
    
    lazy var iconIV: UIImageView = {
        let imageView = UIImageView()
        imageView.image = UIImage(named: "icon_mine_diamond")
        imageView.contentMode = .scaleToFill
        imageView.clipsToBounds = true
        return imageView
    }()
    
    lazy var titleLb: UILabel = {
        let label = UILabel()
        label.textColor = .white
        label.font = UIFont.pingFangSCMedium(ofSize: 15)
        label.textAlignment = .center
        label.text = "我的钻石"
        return label
    }()
    
    lazy var moneyLb: UILabel = {
        let label = UILabel()
        label.textColor = .white
        label.font = UIFont.pingFangSCMedium(ofSize: 15)
        label.textAlignment = .center
        label.text = ""
        return label
    }()
    
    private lazy var moreIV: UIImageView = {
        let imageView = UIImageView()
        imageView.image = UIImage(named: "icon_Mine_更多权益")
        imageView.contentMode = .scaleToFill
        imageView.clipsToBounds = true
        return imageView
    }()
    
  
 
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        self.backgroundColor = .clear
        self.selectionStyle = .none
        self.contentView.addSubview(backView)
        backView.addSubviews([iconIV, titleLb, moneyLb, moreIV])
        
        backView.snp.makeConstraints { make in
            make.top.equalToSuperview().offset(14)
            make.leading.trailing.equalToSuperview().inset(14)
            make.height.equalTo(60)
            make.bottom.equalToSuperview()
        }
        
        iconIV.snp.makeConstraints { make in
            make.centerY.equalToSuperview()
            make.leading.equalToSuperview().offset(16)
            make.width.equalTo(30)
            make.height.equalTo(24)
        }
        
        titleLb.snp.makeConstraints { make in
            make.centerY.equalToSuperview()
            make.leading.equalTo(iconIV.snp.trailing).offset(14)
        }
        
        moreIV.snp.makeConstraints { make in
            make.centerY.equalToSuperview()
            make.trailing.equalToSuperview().offset(-14)
        }
        
        moneyLb.snp.makeConstraints { make in
            make.centerY.equalToSuperview()
            make.trailing.equalTo(moreIV.snp.leading).offset(-10)
        }
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    
}

